﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-trasitional.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<link rel="stylesheet"
			href="/static/css/table.css" type="text/css">
		<script type="text/javascript"
			src="/static/javascript/comm/comm.js">
		</script>
		<!--以下3个js库必须按照顺序引入-->
		<!--vue脚本库-->
		<script type="text/javascript"
				src="/static/js/vue-3.2.4.global.js">
			<!--axios脚本库-->
		</script>
		<script type="text/javascript"
				src="/static/js/axios-0.18.0.min.js">
		</script>
		<!--我们自己封装的axios函数库 -->
		<script type="text/javascript"
				src="/static/js/axios-helper.js">
		</script>
	</head>
	

	<body id="app">
		<form action="second_kind_register_success.html" method="post">
					<input type="hidden" id="firstKindName" name="cfsk.firstKindName">
			<table width="100%">
				<tr>
					<td>
						<font color="black">您正在做的业务是：人力资源--客户化设置--人力资源档案管理设置--II级机构设置--II级机构添加
						</font>
					</td>
				</tr>
				<tr>
					<td align="right">
						<input type="button" value="提交" @click="submit()" class="BUTTON_STYLE1">
						<input type="button" value="返回" class="BUTTON_STYLE1"
							onclick="history.back();">
					</td>
				</tr>
			</table>


			<table width="100%" border="1" cellpadding=0 cellspacing=1
				bordercolorlight=#848284 bordercolordark=#eeeeee
				class="TABLE_STYLE1">
				<tr>
					<td width="19%" class="TD_STYLE1">
						I级机构名称
					</td>
					<td width="81%" class="TD_STYLE2">
					<select  v-model="configFileSecondKind">
						<option v-for="first in configFileFirstKindList"
								:value="first">{{first.firstKindName}}</option>
					</select>
					</td>
				</tr>
				<tr>
					<td width="19%" class="TD_STYLE1">
						II级机构编号
					</td>
					<td width="81%" class="TD_STYLE2">
						<input type="text" v-model="ConfigFileSecondKind.secondKindId" />
					</td>
				</tr>
				<tr>
					<td class="TD_STYLE1">
						II级机构名称
					</td>
					<td class="TD_STYLE2">
						<input type="text" v-model="ConfigFileSecondKind.secondKindName" />
					</td>
				</tr>
				<tr>
					<td class="TD_STYLE1">
						薪酬发放责任人编号（多个编号之间请用"半角逗号"加"一个空格"隔开，如", "）
					</td>
					<td class="TD_STYLE2">
						<textarea rows="4" cols="" v-model="ConfigFileSecondKind.secondSalaryId"></textarea>
					</td>
				</tr>
				<tr>
					<td class="TD_STYLE1">
						销售责任人编号（多个编号之间请用"半角逗号"加"一个空格"隔开，如", "）
					</td>
					<td class="TD_STYLE2">
						<textarea rows="4" cols="" v-model="ConfigFileSecondKind.secondSaleId">" ></textarea>
					</td>
				</tr>
			</table>
		</form>
	</body>
	<script type="module">
		Vue.createApp({
			data(){
				return{
					//查询一级机构列表
					configFileFirstKindList:[],
					configFileSecondKind:null,
					//添加对象
					ConfigFileSecondKind:{
						//主键，自动增长列
						fskid:null,
						//一级机构编号
						firstKindId:null,
						//一级机构名称
						firstKindName:null,
						//二级机构编号
						secondKindId:null,
						//二级机构名称
						secondKindName:null,
						//二级机构薪酬发放责任人编号
						secondSalaryId:null,
						//二级机构销售责任人编号
						secondSaleId:null
					}
				}
			},
			methods:{
				submit(){
					// console.info(this.configFileSecondKind);
					this.ConfigFileSecondKind.firstKindId = this.configFileSecondKind.firstKindId;
					this.ConfigFileSecondKind.firstKindName=this.configFileSecondKind.firstKindName;
					console.info(this.ConfigFileSecondKind);
					requestPostman("/configFileSecondKind/save",this.ConfigFileSecondKind).then((data)=>{
						if(data.statusCode==1){
							window.location.href="/templates/page/client/second_kind_register_success.html"
						}
					})
				}
			},
			created(){
				requestGet("/configFileFirstKind/queryList").then((data)=>{
					console.info(data);
					this.configFileFirstKindList=data;
				})
			}
		}).mount("#app");
	</script>
</html>

